﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyWeb.ServiceBus.Model.Models
{
    [Table("ESB.Gateway")]
    [SysTable]
    public class Gateway : Root<long>
    {
        /// <summary>
        /// 服务Id
        /// </summary>
        public long ServiceId { get; set; }
        #region 版本信息
        /// <summary>
        /// 服务版本
        /// </summary>
        public string Version { get; set; } = string.Empty;
        /// <summary>
        /// 版本状态【草稿，发布，阻塞，冻结，过时】
        /// </summary>
        public string Status { get; set; } = string.Empty;
        /// <summary>
        /// 服务多地址负载策略
        /// </summary>
        public int LoadBalance { get; set; }
        /// <summary>
        /// 限流阀值(次/分钟) ⁣
        /// </summary>
        public int ThresholdValue { get; set; }
        /// <summary>
        /// 是否熔断
        /// </summary>
        public bool IsFusing { get; set; }
        #endregion

        #region 版本地址信息
        /// <summary>
        /// 服务地址
        /// </summary>
        public string ServiceUri { get; set; } = string.Empty;
        /// <summary>
        /// 服务类型【内网服务、外部服务】
        /// </summary>
        public int ServiceType { get; set; }
        #endregion

        #region 网关信息
        /// <summary>
        /// 签名方式
        /// </summary>
        public int SignType { get; set; }
        /// <summary>
        /// 服务请求方式
        /// </summary>
        public string Requst { get; set; } = string.Empty;
        
        /// <summary>
        /// 业务报文是否加密
        /// </summary>
        public bool IsMD { get; set; }
        /// <summary>
        /// 是否检查时间戳
        /// </summary>
        public bool IsCheckTime { get; set; }
        #endregion
    }
}
